﻿<!--
Copyright (c) Microsoft. All rights reserved.
//*********************************************************
-->

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title></title>
    <script src="/js/scenario2-GetCurrentTextSegmentFromIndex.js"></script>
</head>

<body class="win-type-body">
    <div id="scenarioView">
        <div>
            <h2 id="sampleHeader" class="win-type-subheader">Description:</h2>
            <div id="scenarioDescription">
                <p>For any text, it is possible to find the bounds between segments in that text. The most commonly desired segments are &apos;word&apos; and &apos;selection&apos; segments. Word Segments represent language-specific words in the text. Selection
                    segments are similar to word segments, but represent the bounds between active selections (ie, if you were actively selecting this text, the bounds would identify where the selection would snap to).</p>

                <p>Both word and selection segments are language-specific, and employ that language&apos;s word breaking logic to identify these segments within the text. A language tag is recommended to specify the language-behavior rules to use; if no
                    language tag is provided, language-neutral word-breaking rules will be used.</p>

                <p>This scenario will allow you to enter a string of text and specify a character index (0-based) within the string, and get the returned word or selection segment that contains the index that was given.</p>
            </div>
        </div>
        <div id="scenarioContent">
            <div>
                <label>Input String: </label>
                <input type="text" id="inputStringBox" value="" tabindex="1" style="width: 70%" class="win-textbox">
            </div>
            <div>
                <label>Language Tag: </label>
                <input type="text" id="languageTagBox" tabindex="2" style="width: 200px" class="win-textbox">
            </div>
            <div>
                <label>Text Index: </label>
                <input type="text" id="textIndexBox" tabindex="3" style="width: 200px" class="win-textbox">
            </div>
            <div>
                <button id="WordSegmentButton" class="win-button">Word Segments</button>
                <button id="SelectionSegmentButton" class="win-button">Selection Segments</button>
            </div>
        </div>
    </div>
</body>

</html>